package com.today.usercenter.network.api;

import com.today.lib.common.network.entity.EmptyResponseEntity;
import com.today.usercenter.network.entity.RegisterResponseEntity;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by cgm on 2018/8/15.
 * 我的所有的API 接口
 */

public interface UserService {
    /**
     * 获取验证码
     */
    @POST("login/sendmsg/")
    @FormUrlEncoded
    Observable<EmptyResponseEntity> getCode(@Field("mobile") String mobile);

    /**
     * 登录兼注册
     */
    @POST("login/")
    @FormUrlEncoded
    Observable<RegisterResponseEntity> login(@Field("sex") int sex, @FieldMap Map<String, String> map);
}
